﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="uc_anh_nen.ascx.cs"
    Inherits="TDT_Project.Controller.uc_anh_nen" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<link href="../css/Telerik.css" rel="stylesheet" type="text/css" />
<asp:updatepanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div style="width: 863px; padding-top: 10px; margin: auto">
    <style type="text/css">
        .style8
        {
            height: 70px;
            width: 314px;
        }
        .style7
        {
            height: 35px;
            width: 314px;
        }
        .UpdateProgressContent
        {
            padding: 40px;
            border: 1px dashed #C0C0C0;
            background-color: #FFFFFF;
            width: 200px;
            text-align: center;
            vertical-align: bottom;
            z-index: 1001;
            top: 40%;
            margin: 0px;
            margin-left: -141px;
            position: absolute;
        }
        
        .NoUnderLine
        {
            text-decoration: none !important;
        }
        .rcbSlide
        {
            z-index: 8001 !important;
        }
        .RadGrid_Default .rgHeader, .RadGrid_Default th.rgResizeCol
        {
            /*background: none !important;*/
        }
        /*.tdItem
    {
        padding: 0px !important;
    }*/
        .gridWiewHeader
        {
            background-color: #2D79F8 !important;
            padding: 0 !important;
        }
        .rgHeader gridWiewHeader
        {
            padding: 0 !important;
        }
        .gridWiew td
        {
            border: none;
            border-bottom: 1px solid #96CAFF !important;
        }
        .gridWiewHeader tr
        {
            height: 5px !important;
        }
        .style9
        {
            width: 83px;
        }
        .style10
        {
            height: 35px;
            width: 83px;
        }
        .style11
        {
            width: 314px;
        }
    </style>
    <p>
    </p>
 
    <div style="text-align: center; font-weight: bold; color:Blue;">
        <h3>
            CẤU HÌNH ẢNH NỀN
        </h3>
    </div>
    <div style="width: 863px; padding-top: 10px; margin: auto">
        <table>
            <tr style="height: 10px;">
                <td align="left" colspan="2">
                    <strong>
                        <asp:Label ID="lbMessage" CssClass="SuccessMessage" ForeColor="Red" runat="server"></asp:Label>
                            <asp:Label ID="lbl_id_anh" CssClass="SuccessMessage" ForeColor="Red" runat="server" Visible="false"></asp:Label>
                    </strong>
                </td>
            </tr>
            <tr>
                <td class="style10">
                    <strong>Hình ảnh: </strong>
                </td>
                <td class="style8">
                <telerik:RadAsyncUpload ID="File" runat="server" 
                     Skin="Office2010Blue"
                     MultipleFileSelection="Disabled"
                     MaxFileSize="2000000"
                     MaxFileInputsCount="1"
                     AllowedFileExtensions=".jpg,.png"
                     >
                 </telerik:RadAsyncUpload>
                   
                </td>
            </tr>
            <tr>
                <td class="style10">
                    <strong>Hiện ẩn: </strong>
                </td>
                <td class="style7">
                    <asp:CheckBox ID="chklogin" runat="server" />
                </td>
            </tr>
            <tr>
                <td class="style9">
                </td>
                <td class="style11">
                    <telerik:RadButton runat="server" ValidationGroup="p" ID="btnThemmoi" CssClass="RadButton"
                        ButtonType="ToggleButton" HoveredCssClass="RadButtonHover" Text="Thêm mới" Skin="Telerik"
                        Width="105px" Height="30px" OnClick="btnThemmoi_Click">
                    </telerik:RadButton>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                    <telerik:RadButton runat="server" ValidationGroup="p" ID="btnGhi" CssClass="RadButton"
                        ButtonType="ToggleButton" HoveredCssClass="RadButtonHover" Text="Ghi" Skin="Telerik"
                        Width="105px" Height="30px" OnClick="btnGhi_Click">
                    </telerik:RadButton>
                </td>
            </tr>
        </table>
        <div style="width: 863px; padding-top: 10px; margin: auto">
            <telerik:RadGrid ID="gvResult_TTT" runat="server" AutoGenerateColumns="False" Width="844px"
                PageSize="50" HeaderStyle-CssClass="gridWiewHeader" PagerStyle-HorizontalAlign="Center"
                AlternatingRowStyle-CssClass="alt" PagerStyle-CssClass="gridWiewPaging" CellSpacing="0"
                GridLines="None" OnItemCommand="gvResult_TTT_ItemCommand" OnSelectedCellChanged="gvResult_TTT_SelectedCellChanged"
                OnItemDataBound="gvResult_TTT_ItemDataBound" OnPageIndexChanged="gvResult_TTT_PageIndexChanged">
                <HeaderStyle CssClass="gridWiewHeader" />
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                <MasterTableView NoMasterRecordsText="Không tìm thấy dữ liệu." DataKeyNames="id_anh"
                    TableLayout="Fixed">
                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="STT" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                            HeaderText="STT" UniqueName="STT" ReadOnly="True" HeaderStyle-Width="40">
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="hinh_anh" ItemStyle-HorizontalAlign="Center"
                            HeaderStyle-HorizontalAlign="Center" HeaderText="Hình ảnh" UniqueName="hinh_anh"
                            ReadOnly="True" HeaderStyle-Width="200">
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                          <telerik:GridBoundColumn DataField="id_anh" ItemStyle-HorizontalAlign="Center"
                            HeaderStyle-HorizontalAlign="Center" HeaderText="Hình ảnh" UniqueName="id_anh" Display="false"
                            ReadOnly="True" HeaderStyle-Width="200">
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Hienan" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                            HeaderText="Hiện ẩn" UniqueName="Hienan" ReadOnly="True" HeaderStyle-Width="200">
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                       <telerik:GridTemplateColumn HeaderText="Sửa" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Button ID="lnkEditItem" CssClass="btnEdit"  Width='19px' Height='19px' CommandArgument='<%# Eval("id_anh") %>'
                                            CommandName="EditItem" runat="server"></asp:Button>
                                    </ItemTemplate>
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Xóa" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Button ID="lnkEditDel" CssClass="btnX"  Width='19px' Height='19px' CommandArgument='<%# Eval("id_anh") %>' OnClientClick="javascript:return confirm('Bạn có chắc muốn xóa tin này không?');"
                                            CommandName="EditDelItem" runat="server"></asp:Button>
                                    </ItemTemplate>
                                    <HeaderStyle Width="30px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="false" />
                </ClientSettings>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
        </div>
    </div>
</div>
</ContentTemplate>
</asp:updatepanel>
   <script language="javascript" type="text/javascript">
       function ResetMassage(time, lbMessage) {
           setTimeout(
            function () {
                document.getElementById(lbMessage).innerHTML = "";
            }, time);
       }
</script>